package com.exmaple.springcloud.controller;

import com.exmaple.springcloud.apis.PayFeignApi;
import com.exmaple.springcloud.domain.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/consumer")
public class OrderGateWayController
{
    @Autowired
    private PayFeignApi payFeignApi;

    @GetMapping(value = "/pay/gateway/get/{id}")
    public R getById(@PathVariable("id") Integer id)
    {
        return payFeignApi.gateWayGetPayById(id);
    }

    @GetMapping(value = "/pay/gateway/info")
    public R getGatewayInfo()
    {
        return payFeignApi.getGatewayInfo();
    }
}